Genetic algorithm solver in matlab